// All source files and native code may not be transmitted, reproduced, distributed, 
// or commercially exploited in any way without the express written consent of Sybex Inc.

//MOST THINGS THAT CHANGE

//CHAPTER TITLE
var TestChapter:String = "Chapter 1";

var user_Correct:Array = new Array("AC","B","B","D","D","E","C","ACD","AD","A","C","B","CD","A","CD","D","D","D","BC","AD");

total = user_Correct.length;
_root.countdown = false;
// set to false to make the timer count up //
_root.hour = 0;
// number of hours at start//
_root.minute = 0;
// number of minutes at start//
//DON'T FORGET THE QUESTIONS AT THE END
//END OF MOST THINGS THAT CHANGE
//
//
//The following is used in the timer mc for adjusting the clock.
_root.delay = false;
_root.wait = 60;
//wait in seconds
_root.lastTime = Math.floor(getTimer()/1000);
i = 1;
totalCorrect = 0;
totalWrong = 0;
QCounter.QTotal.text = total;
Test_Title.text = TestChapter;
var finalCorrect:Number;
var userResponse:Array = new Array(total);
var markResponse:Array = new Array(total);
user_responseA = "";
user_responseB = "";
user_responseC = "";
user_responseD = "";
user_responseE = "";
user_responseF = "";
user_responseG = "";
user_responseH = "";
user_responseI = "";
user_responseJ = "";
user_responseK = "";
user_responseL = "";
user_responseM = "";
user_responseN = "";
_root.review = false;

function initialize() {
	_root.review = false;
	for (j=0; j<total; j++) {
		userResponse[j] = "";
		markResponse[j] = "";
	}
	
}

function showMatch() {
	set("user_response"+i, user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN);
	userResponse[i-1] = user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN;
}

// display multiple choice user_response answer function
function display() {
	set("user_response"+i, user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN);
	userResponse[i-1] = user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN;

	//**NEW
	response.text = userResponse[i-1];
	
}

//radio button function
function answer(choice) {
	set("user_response"+i, choice);
	userResponse[i-1] = choice;
	
	//**NEW
	response.text = userResponse[i-1];	
}

// marker button fuction
function mark(choice) {
	_root["mark"+i] = choice;
	markResponse[i-1] = choice;
}

// display fill in the blank by user.
function submit(userInput) {
	_root["user_response"+i] = userInput;
}

function reset() {
	_root["user_response"+i] = "";
}

function UnloadReview() {
	//ReviewLinks.unloadMovie();
}


function LayoutQuestion() {

	qname = "q"+(_root._currentframe-1);
	
	markname = "m"+(_root._currentframe-1);
	
	_root.loadQuestion(_root._currentframe-1);	
	
	_root.createEmptyMovieClip("container", 1);

	_root.attachMovie("Marker_mc", markname, 2, {_x:65.4, _y:55.4});
	
	if (_root.question_type == "2R") { this.attachMovie("2R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "3R") { this.attachMovie("3R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "3MC") { this.attachMovie("3MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "4R") { this.attachMovie("4R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "4MC") { this.attachMovie("4MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "5R") { this.attachMovie("5R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "5MC") { this.attachMovie("5MC", qname, 1, {_x:24, _y:165}); }	
	if (_root.question_type == "6R") { this.attachMovie("6R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "6MC") { this.attachMovie("6MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "7R") { this.attachMovie("7R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "7MC") { this.attachMovie("7MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "8R") { this.attachMovie("8R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "8MC") { this.attachMovie("8MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "9R") { this.attachMovie("9R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "9MC") { this.attachMovie("9MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "10R") { this.attachMovie("10R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "10MC") { this.attachMovie("10MC", qname, 1, {_x:24, _y:165}); }


	if (_root.review == false) { _root.attachMovie("show_answer", "show_answer1", 3, {_x:72, _y:418}); }
	if (_root.review == true)  { _root.attachMovie("show_review", "show_review1", 3, {_x:72, _y:418}); }
        if (_root.figure_flag == "True") { _root.attachMovie("show_figure", "show_figure1", 6, {_x:72, _y:418}); }
        if (_root.figure_flag == "False") { _root.createEmptyMovieClip("container", 6); }        

	question_scroll._visible = (question_text.maxscroll > 1);
	question_scroll.setSize(85,16); 
	
	//**NEW
	response.text = userResponse[i-1];
}

function loadQuestion(inNum:Number) {
	var cur:Number = inNum;
	//This corrects for the first frame holding all functions
	//QUESTIONS AND ANSWERS CAN ACCEPT HTML FORMATTING!!!
	//EACH QUESTION SHOULD BE FORMATTED SIMILAR TO THE FOLLOWING.

	switch (cur) {
case 1 :
_root.question = "Point-to-point links typically use which antenna types? (Choose 2.)";
_root.answerA = "Semidirectional";
_root.answerB = "Omnidirectional";
_root.answerC = "Highly directional";
_root.answerD = "Long range omnidirectional";
_root.correct = "AC";
_root.explanation = "Semidirectional and highly directional antennas are used for point-to-point links. Omnidirectional antennas are for point-to-multipoint links. Long range omnidirectional antennas do not exist.";
_root.figure_flag = "False";
_root.question_type = "4MC";
break;

case 2 :
_root.question = "Typically a point-to-multipoint link consists of ____ connections.";
_root.answerA = "Two";
_root.answerB = "Three";
_root.answerC = "Four";
_root.answerD = "Five";
_root.correct = "B";
_root.explanation = "Point-to-multipoint links typically have three or more connections.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 3 :
_root.question = "True or false? A point-to-point link always uses an omnidirectional antenna.";
_root.answerA = "True";
_root.answerB = "False";
_root.correct = "B";
_root.explanation = "Point-to-multipoint links use omnidirectional antennas, but point-to-point links do not.";
_root.figure_flag = "False";
_root.question_type = "2R";
break;

case 4 :
_root.question = "What organization is responsible for unlicensed frequency band regulation in the United States?";
_root.answerA = "ETSI";
_root.answerB = "Wi-Fi Alliance";
_root.answerC = "IEEE";
_root.answerD = "FCC";
_root.answerE = "WPA";
_root.correct = "D";
_root.explanation = "The FCC is the local regulatory body responsible for frequency regulation in the U.S.";
_root.figure_flag = "False";
_root.question_type = "5R";
break;

case 5 :
_root.question = "802.11g LANs operate in what frequency range?";
_root.answerA = "900 MHz";
_root.answerB = "5.15&#8212;5.25 GHz";
_root.answerC = "5.25&#8212;5.35 GHz";
_root.answerD = "2.4&#8212;2.5 GHz";
_root.correct = "D";
_root.explanation = "802.11g LANs operate in the 2.4&#8212;2.5 GHz ISM band. 900 MHz is not used with 802.11 wireless LANs, and 5 GHz is 802.11a.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 6 :
_root.question = "Which of the following organizations is responsible for standards compliance?";
_root.answerA = "FCC";
_root.answerB = "ETSI";
_root.answerC = "IEEE";
_root.answerD = "WPA2";
_root.answerE = "Wi-Fi Alliance";
_root.correct = "E";
_root.explanation = "The Wi-Fi Alliance performs interoperability testing and verifies standards compliance.";
_root.figure_flag = "False";
_root.question_type = "5R";
break;

case 7 :
_root.question = "802.11a uses which spread spectrum technology?";
_root.answerA = "ERP-OFDM";
_root.answerB = "HR/DSSS";
_root.answerC = "OFDM";
_root.answerD = "FHSS";
_root.correct = "C";
_root.explanation = "802.11a uses OFDM; ERP-OFDM is used in 802.11g.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 8 :
_root.question = "802.11b is capable of which of the following data rates? (Choose 3.)";
_root.answerA = "1 Mbps";
_root.answerB = "6 Mbps";
_root.answerC = "5.5 Mbps";
_root.answerD = "11 Mbps";
_root.answerE = "12 Mbps";
_root.correct = "ACD";
_root.explanation = "802.11b can use 1, 2, 5.5 and 11 Mbps. 6 and 12 Mbps are used in 802.11a and 802.11g.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 9 :
_root.question = "802.11g is backward compatible to which of the following IEEE wireless LAN standards? (Choose 2.)";
_root.answerA = "802.11 DSSS";
_root.answerB = "802.11a OFDM";
_root.answerC = "802.11a ERP-OFDM";
_root.answerD = "802.11b HR/DSSS";
_root.answerE = "802.3af";
_root.correct = "AD";
_root.explanation = "802.11g is backward compatible to DSSS and HR/DSSS";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 10 :
_root.question = "In the 802.11a amendment, the UNII-3 band can be used for which of the following WLAN applications?";
_root.answerA = "Indoor and outdoor";
_root.answerB = "Outdoor only";
_root.answerC = "Indoor only";
_root.answerD = "The UNII-3 band cannot be used for WLANs.";
_root.correct = "A";
_root.explanation = "The UNII-3 band can be used indoors or outdoors, but typically is used outdoors only.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 11 :
_root.question = "The 802.11i amendment to the standard addresses which of the following technologies?";
_root.answerA = "Quality of service";
_root.answerB = "DSSS";
_root.answerC = "Security";
_root.answerD = "MIMO";
_root.correct = "C";
_root.explanation = "802.11i addresses security. 802.11e addresses quality of service.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 12 :
_root.question = "Which of the following best describes the Wi-Fi Alliance?";
_root.answerA = "U.S.-based standards organization";
_root.answerB = "Interoperability testing organization";
_root.answerC = "Works with the FCC to verify compliance";
_root.answerD = "Local regulatory body for Europe";
_root.correct = "B";
_root.explanation = "Wi-Fi Alliance performs interoperability testing for IEEE 802.11 wireless LAN standards.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 13 :
_root.question = "Which of the following is addressed by the Wi-Fi Multimedia (WMM) certification? (Choose 2.)";
_root.answerA = "Security";
_root.answerB = "WPA and WPA2";
_root.answerC = "QoS";
_root.answerD = "Quality of service";
_root.correct = "CD";
_root.explanation = "Both C and D are both correct since QoS is an acronym for quality of service. WMM is a proactive Wi-Fi Alliance certification for quality of service. WPA and WPA are certifications that address security.";
_root.figure_flag = "False";
_root.question_type = "4MC";
break;

case 14 :
_root.question = "Wi-Fi Protected Setup was designed for which of the following wireless applications?";
_root.answerA = "Small office/home office (SOHO) organizations";
_root.answerB = "Enterprise organizations";
_root.answerC = "FCC interoperability";
_root.answerD = "Security organizations";
_root.correct = "A";
_root.explanation = "Wi-Fi Protected Setup was designed with SOHO users in mind.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 15 :
_root.question = "The 802.11g standard uses which two spread spectrum technologies?";
_root.answerA = "FHSS";
_root.answerB = "OFDM";
_root.answerC = "ERP-OFDM";
_root.answerD = "DSSS";
_root.answerE = "MIMO";
_root.correct = "CD";
_root.explanation = "802.11g can use ERP-OFDM and DSSS.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 16 :
_root.question = "WPA was developed as an interim solution for which amendment to the 802.11 standard?";
_root.answerA = "802.11a";
_root.answerB = "802.11n";
_root.answerC = "802.11e";
_root.answerD = "802.11i";
_root.answerE = "802.11g";
_root.correct = "D";
_root.explanation = "WPA was designed as a pre-802.11i solution for wireless security.";
_root.figure_flag = "False";
_root.question_type = "5R";
break;

case 17 :
_root.question = "Which of the following is correct regarding 802.11e?";
_root.answerA = "Only operates in the 5 GHz frequency range";
_root.answerB = "Only operates at 1, 2, 5.5, and 11Mbps";
_root.answerC = "Addresses wireless security";
_root.answerD = "Addresses wireless quality of service";
_root.correct = "D";
_root.explanation = "802.11e is a specific function amendment addressing quality of service.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 18 :
_root.question = "According to the 802.11a amendment, which of the following data rates are mandatory?";
_root.answerA = "1, 2, 5.5, and 11 Mbps";
_root.answerB = "6, 24, and 54 Mbps";
_root.answerC = "6, 9, 12, 18, 24, 36, 48, and 54 Mbps";
_root.answerD = "6, 12, and 24 Mbps";
_root.answerE = "1, 6, 12, and 24 Mbps";
_root.correct = "D";
_root.explanation = "The IEEE requires 6, 12, and 24 Mbps for 802.11a OFDM.";
_root.figure_flag = "False";
_root.question_type = "5R";
break;

case 19 :
_root.question = "You support a wireless network for an office of five employees. The installation consists of one access point, three notebook computers, and two desktop computers. The access point and computers in the office have wireless adapters that are Wi-Fi WPA 2.0 Certified. You want to use the highest level security possible without additional cost or administration. Which of the following solutions would be best for this deployment? (Choose 2.)";
_root.answerA = "WEP";
_root.answerB = "WPA 2.0 personal";
_root.answerC = "WPS";
_root.answerD = "WMM";
_root.answerE = "WPA 2.0 enterprise";
_root.correct = "BC";
_root.explanation = "WPA 2.0 Personal and WPS are both designed with the small business in mind.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 20 :
_root.question = "Which two of the following options are for Wi-Fi Protected Access 2 (WPA 2.0)?";
_root.answerA = "Personal mode";
_root.answerB = "Protection mode";
_root.answerC = "Professional mode";
_root.answerD = "Enterprise mode";
_root.answerE = "WPA 2 mode";
_root.correct = "AD";
_root.explanation = "WPA 2.0 consists of personal mode using passphrase and enterprise mode using 802.1X/EAP.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

	}
		
	QCounter.QCurrent.text = cur;
}

initialize();


//Change the following question numbers to the indicated question type!
//1. 4MC
//2. 4R
//3. 2R
//4. 5R
//5. 4R
//6. 5R
//7. 4R
//8. 5MC
//9. 5MC
//10. 4R
//11. 4R
//12. 4R
//13. 4MC
//14. 4R
//15. 5MC
//16. 5R
//17. 4R
//18. 5R
//19. 5MC
//20. 5MC





//